<template>
    <div>
        <h2>添加页面</h2>
        {{ str }}
        <input type="button" value="num变化" v-on:click="changeNum"/>
        <input type="button" value="num变化" @click="changeNum"/>
        <input type="button" value="num变化" @click="changstr"/>
        <p></p>
    </div>
</template>

<script setup lang="ts">
import { ref,reactive } from 'vue';
let num=ref(100);
let str=ref("好好学习");

const changeNum=()=>{
    num.value++;
    console.log(num.value);

}
const changstr=()=>{
    str.value="天天向上"
}


</script>

<style scoped>

</style>